home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Mailbox/MIME Entity
(archive/mbox).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| Mailbox/MIME Entity (archive/mbox)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/950 MIME Email (1.0)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 6f 64 | 69 2e 63 6f 6d 21 75 73 |Path: od|i.com!us|
|00000010| 65 6e 65 74 0a 46 72 6f | 6d 3a 20 4b 69 6d 62 65 |enet.Fro|m: Kimbe|
|00000020| 72 6c 65 79 20 42 75 72 | 63 68 65 74 74 20 3c 62 |rley Bur|chett <b|
|00000030| 75 72 63 68 65 74 74 3e | 0a 4e 65 77 73 67 72 6f |urchett>|.Newsgro|
|00000040| 75 70 73 3a 20 63 6f 6d | 70 2e 6c 61 6e 67 2e 63 |ups: com|p.lang.c|
|00000050| 2b 2b 0a 53 75 62 6a 65 | 63 74 3a 20 52 65 3a 20 |++.Subje|ct: Re: |
|00000060| 73 69 6d 70 6c 65 20 64 | 65 73 69 67 6e 20 71 75 |simple d|esign qu|
|00000070| 65 73 74 69 6f 6e 0a 44 | 61 74 65 3a 20 33 20 46 |estion.D|ate: 3 F|
|00000080| 65 62 20 31 39 39 36 20 | 30 30 3a 30 35 3a 34 30 |eb 1996 |00:05:40|
|00000090| 20 47 4d 54 0a 4f 72 67 | 61 6e 69 7a 61 74 69 6f | GMT.Org|anizatio|
|000000a0| 6e 3a 20 53 6f 66 74 77 | 61 72 65 20 4c 65 76 65 |n: Softw|are Leve|
|000000b0| 72 61 67 65 2c 20 49 6e | 63 0a 4d 65 73 73 61 67 |rage, In|c.Messag|
|000000c0| 65 2d 49 44 3a 20 3c 34 | 65 75 38 73 6b 24 64 31 |e-ID: <4|eu8sk$d1|
|000000d0| 66 40 6d 61 73 74 65 72 | 6d 69 6e 64 2e 6f 64 69 |f@master|mind.odi|
|000000e0| 2e 63 6f 6d 3e 0a 52 65 | 66 65 72 65 6e 63 65 73 |.com>.Re|ferences|
|000000f0| 3a 20 3c 44 4d 34 75 38 | 49 2e 47 31 48 40 65 6d |: <DM4u8|I.G1H@em|
|00000100| 72 31 2e 65 6d 72 2e 63 | 61 3e 0a 4e 4e 54 50 2d |r1.emr.c|a>.NNTP-|
|00000110| 50 6f 73 74 69 6e 67 2d | 48 6f 73 74 3a 20 6c 6f |Posting-|Host: lo|
|00000120| 6f 6e 2e 6f 64 69 2e 63 | 6f 6d 0a 4d 69 6d 65 2d |on.odi.c|om.Mime-|
|00000130| 56 65 72 73 69 6f 6e 3a | 20 31 2e 30 0a 43 6f 6e |Version:| 1.0.Con|
|00000140| 74 65 6e 74 2d 54 79 70 | 65 3a 20 74 65 78 74 2f |tent-Typ|e: text/|
|00000150| 70 6c 61 69 6e 3b 20 63 | 68 61 72 73 65 74 3d 75 |plain; c|harset=u|
|00000160| 73 2d 61 73 63 69 69 0a | 43 6f 6e 74 65 6e 74 2d |s-ascii.|Content-|
|00000170| 54 72 61 6e 73 66 65 72 | 2d 45 6e 63 6f 64 69 6e |Transfer|-Encodin|
|00000180| 67 3a 20 37 62 69 74 0a | 58 2d 4d 61 69 6c 65 72 |g: 7bit.|X-Mailer|
|00000190| 3a 20 4d 6f 7a 69 6c 6c | 61 20 31 2e 31 4e 20 28 |: Mozill|a 1.1N (|
|000001a0| 58 31 31 3b 20 49 3b 20 | 53 75 6e 4f 53 20 34 2e |X11; I; |SunOS 4.|
|000001b0| 31 2e 33 20 73 75 6e 34 | 63 29 0a 54 6f 3a 20 6a |1.3 sun4|c).To: j|
|000001c0| 61 67 72 61 6e 74 40 65 | 6d 72 31 2e 65 6d 72 2e |agrant@e|mr1.emr.|
|000001d0| 63 61 0a 58 2d 55 52 4c | 3a 20 6e 65 77 73 3a 44 |ca.X-URL|: news:D|
|000001e0| 4d 34 75 38 49 2e 47 31 | 48 40 65 6d 72 31 2e 65 |M4u8I.G1|H@emr1.e|
|000001f0| 6d 72 2e 63 61 0a 0a 6a | 61 67 72 61 6e 74 40 65 |mr.ca..j|agrant@e|
|00000200| 6d 72 31 2e 65 6d 72 2e | 63 61 20 28 4a 6f 68 6e |mr1.emr.|ca (John|
|00000210| 20 47 72 61 6e 74 29 20 | 77 72 6f 74 65 3a 0a 3e | Grant) |wrote:.>|
|00000220| 0a 3e 54 68 65 20 73 69 | 6d 70 6c 65 20 71 75 65 |.>The si|mple que|
|00000230| 73 74 69 6f 6e 20 69 73 | 3a 20 73 68 6f 75 6c 64 |stion is|: should|
|00000240| 20 49 20 69 6d 70 6c 65 | 6d 65 6e 74 20 47 65 74 | I imple|ment Get|
|00000250| 44 61 74 61 28 29 20 61 | 73 20 70 61 72 74 20 6f |Data() a|s part o|
|00000260| 66 20 74 68 69 73 0a 3e | 63 6c 61 73 73 2c 20 69 |f this.>|class, i|
|00000270| 2e 65 2e 3a 0a 2e 2e 0a | 3e 6f 72 20 73 68 6f 75 |.e.:....|>or shou|
|00000280| 6c 64 20 47 65 74 44 61 | 74 61 28 29 20 72 65 61 |ld GetDa|ta() rea|
|00000290| 6c 6c 79 20 62 65 20 69 | 6e 20 61 20 73 65 70 61 |lly be i|n a sepa|
|000002a0| 72 61 74 65 20 63 6c 61 | 73 73 20 77 68 69 63 68 |rate cla|ss which|
|000002b0| 20 75 73 65 73 20 74 68 | 65 20 66 69 72 73 74 20 | uses th|e first |
|000002c0| 63 6c 61 73 73 3a 0a 2e | 2e 0a 3e 54 68 65 20 72 |class:..|..>The r|
|000002d0| 65 61 73 6f 6e 20 49 20 | 61 73 6b 2c 20 69 73 20 |eason I |ask, is |
|000002e0| 74 68 65 20 70 6f 74 65 | 6e 74 69 61 6c 20 66 6f |the pote|ntial fo|
|000002f0| 72 20 63 6f 6e 66 6c 69 | 63 74 20 69 6e 20 74 68 |r confli|ct in th|
|00000300| 65 20 75 73 65 20 6f 66 | 20 74 68 65 0a 3e 70 72 |e use of| the.>pr|
|00000310| 69 76 61 74 65 20 76 61 | 72 69 61 62 6c 65 73 2e |ivate va|riables.|
|00000320| 20 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 69 6e | For exa|mple, in|
|00000330| 74 65 72 6e 61 6c 6c 79 | 20 74 68 65 72 65 20 6d |ternally| there m|
|00000340| 69 67 68 74 20 62 65 3a | 0a 3e 09 70 72 69 76 61 |ight be:|.>.priva|
|00000350| 74 65 3a 09 46 49 4c 45 | 20 2a 66 3b 0a 3e 09 09 |te:.FILE| *f;.>..|
|00000360| 09 3c 2e 2e 2e 6d 6f 72 | 65 20 69 6e 74 65 72 6e |.<...mor|e intern|
|00000370| 61 6c 73 2e 2e 2e 3e 0a | 3e 0a 3e 49 66 20 49 20 |als...>.|>.>If I |
|00000380| 75 73 65 64 20 69 74 20 | 69 6e 63 6f 72 72 65 63 |used it |incorrec|
|00000390| 74 6c 79 2c 20 69 2e 65 | 2e 3a 0a 3e 09 6f 62 6a |tly, i.e|.:.>.obj|
|000003a0| 65 63 74 2e 4f 70 65 6e | 28 2e 2e 2e 29 0a 3e 09 |ect.Open|(...).>.|
|000003b0| 6f 62 6a 65 63 74 2e 47 | 65 74 44 61 74 61 28 2e |object.G|etData(.|
|000003c0| 2e 2e 29 09 2f 2f 64 6f | 65 73 20 4f 70 65 6e 2f |..).//do|es Open/|
|000003d0| 52 65 61 64 2f 43 6c 6f | 73 65 0a 3e 09 6f 62 6a |Read/Clo|se.>.obj|
|000003e0| 65 63 74 2e 52 65 61 64 | 28 2e 2e 2e 29 0a 3e 74 |ect.Read|(...).>t|
|000003f0| 68 65 6e 20 6f 62 6a 65 | 63 74 2e 52 65 61 64 28 |hen obje|ct.Read(|
|00000400| 29 20 77 6f 75 6c 64 20 | 62 72 65 61 6b 20 62 65 |) would |break be|
|00000410| 63 61 75 73 65 20 47 65 | 74 44 61 74 61 28 29 20 |cause Ge|tData() |
|00000420| 63 61 6c 6c 73 20 43 6c | 6f 73 65 28 29 2c 20 69 |calls Cl|ose(), i|
|00000430| 6e 76 61 6c 69 64 61 74 | 69 6e 67 0a 3e 27 66 27 |nvalidat|ing.>'f'|
|00000440| 20 61 6e 64 20 6f 74 68 | 65 72 20 69 6e 74 65 72 | and oth|er inter|
|00000450| 6e 61 6c 73 2e 0a 0a 20 | 20 49 20 74 68 69 6e 6b |nals... | I think|
|00000460| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 69 6d 70 6c | you sho|uld impl|
|00000470| 65 6d 65 6e 74 20 69 74 | 20 69 6e 20 74 65 72 6d |ement it| in term|
|00000480| 73 20 6f 66 20 61 20 73 | 65 70 61 72 61 74 65 20 |s of a s|eparate |
|00000490| 66 75 6e 63 74 69 6f 6e | 20 28 6e 6f 74 20 61 0a |function| (not a.|
|000004a0| 73 65 70 61 72 61 74 65 | 20 63 6c 61 73 73 29 2e |separate| class).|
|000004b0| 20 20 49 66 20 79 6f 75 | 20 69 6d 70 6c 65 6d 65 | If you| impleme|
|000004c0| 6e 74 20 69 74 20 61 73 | 20 61 20 6d 65 6d 62 65 |nt it as| a membe|
|000004d0| 72 20 66 75 6e 63 74 69 | 6f 6e 2c 20 74 68 65 72 |r functi|on, ther|
|000004e0| 65 27 73 20 74 68 65 20 | 0a 72 69 73 6b 20 6f 66 |e's the |.risk of|
|000004f0| 20 69 6e 76 61 6c 69 64 | 61 74 69 6e 67 20 74 68 | invalid|ating th|
|00000500| 65 20 6f 62 6a 65 63 74 | 27 73 20 69 6e 74 65 72 |e object|'s inter|
|00000510| 6e 61 6c 20 73 74 61 74 | 65 20 6c 69 6b 65 20 79 |nal stat|e like y|
|00000520| 6f 75 20 73 75 67 67 65 | 73 74 2e 20 20 49 74 20 |ou sugge|st. It |
|00000530| 0a 61 6c 73 6f 20 6d 61 | 6b 65 73 20 74 68 65 20 |.also ma|kes the |
|00000540| 6f 62 6a 65 63 74 20 62 | 69 67 67 65 72 20 61 6e |object b|igger an|
|00000550| 64 20 6d 6f 72 65 20 63 | 6f 6d 70 6c 65 78 20 77 |d more c|omplex w|
|00000560| 69 74 68 6f 75 74 20 65 | 6e 68 61 6e 63 69 6e 67 |ithout e|nhancing|
|00000570| 20 69 74 73 20 70 6f 77 | 65 72 3b 0a 74 68 65 20 | its pow|er;.the |
|00000580| 66 75 6e 63 74 69 6f 6e | 20 63 61 6e 20 62 65 20 |function| can be |
|00000590| 69 6d 70 6c 65 6d 65 6e | 74 65 64 20 65 6e 74 69 |implemen|ted enti|
|000005a0| 72 65 6c 79 20 69 6e 20 | 74 65 72 6d 73 20 6f 66 |rely in |terms of|
|000005b0| 20 74 68 65 20 70 72 69 | 6d 69 74 69 76 65 73 20 | the pri|mitives |
|000005c0| 74 68 65 20 0a 6f 62 6a | 65 63 74 20 61 6c 72 65 |the .obj|ect alre|
|000005d0| 61 64 79 20 6f 66 66 65 | 72 73 2e 0a 20 20 49 6d |ady offe|rs.. Im|
|000005e0| 70 6c 65 6d 65 6e 74 69 | 6e 67 20 69 74 20 61 73 |plementi|ng it as|
|000005f0| 20 61 6e 20 65 78 74 65 | 72 6e 61 6c 20 66 75 6e | an exte|rnal fun|
|00000600| 63 74 69 6f 6e 20 61 6c | 6c 6f 77 73 20 79 6f 75 |ction al|lows you|
|00000610| 20 74 6f 20 6d 6f 64 69 | 66 79 20 62 6f 74 68 20 | to modi|fy both |
|00000620| 74 68 65 0a 6f 62 6a 65 | 63 74 27 73 20 69 6d 70 |the.obje|ct's imp|
|00000630| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 61 6e 64 20 |lementat|ion and |
|00000640| 74 68 65 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |the impl|ementati|
|00000650| 6f 6e 20 6f 66 20 47 65 | 74 44 61 74 61 28 29 20 |on of Ge|tData() |
|00000660| 69 6e 64 65 70 65 6e 64 | 61 6e 74 6c 79 2e 0a 54 |independ|antly..T|
|00000670| 68 69 6e 6b 20 61 62 6f | 75 74 20 77 68 61 74 20 |hink abo|ut what |
|00000680| 73 68 6f 75 6c 64 20 68 | 61 70 70 65 6e 20 69 66 |should h|appen if|
|00000690| 20 4f 70 65 6e 28 29 20 | 66 61 69 6c 73 20 61 6e | Open() |fails an|
|000006a0| 64 20 74 68 72 6f 77 73 | 20 61 6e 20 65 78 63 65 |d throws| an exce|
|000006b0| 70 74 69 6f 6e 2e 0a 54 | 68 65 72 65 20 73 65 65 |ption..T|here see|
|000006c0| 6d 73 20 73 6f 6d 65 74 | 68 69 6e 67 20 76 61 67 |ms somet|hing vag|
|000006d0| 75 65 6c 79 20 77 72 6f | 6e 67 20 77 69 74 68 20 |uely wro|ng with |
|000006e0| 6d 61 6b 69 6e 67 20 61 | 6e 20 6f 62 6a 65 63 74 |making a|n object|
|000006f0| 20 68 61 6e 64 6c 65 20 | 69 74 73 20 6f 77 6e 20 | handle |its own |
|00000700| 0a 65 78 63 65 70 74 69 | 6f 6e 73 2e 20 20 49 66 |.excepti|ons. If|
|00000710| 20 47 65 74 44 61 74 61 | 20 69 73 20 61 6e 20 65 | GetData| is an e|
|00000720| 78 74 65 72 6e 61 6c 20 | 66 75 6e 63 74 69 6f 6e |xternal |function|
|00000730| 2c 20 69 74 20 63 6f 75 | 6c 64 20 6c 6f 67 20 74 |, it cou|ld log t|
|00000740| 68 65 20 65 72 72 6f 72 | 0a 74 6f 20 61 20 66 69 |he error|.to a fi|
|00000750| 6c 65 20 6f 72 20 74 72 | 79 20 74 6f 20 63 6f 72 |le or tr|y to cor|
|00000760| 72 65 63 74 20 69 74 20 | 61 6e 64 20 74 72 79 20 |rect it |and try |
|00000770| 61 67 61 69 6e 2c 20 6f | 72 20 77 68 61 74 65 76 |again, o|r whatev|
|00000780| 65 72 2e 0a 20 20 49 66 | 20 79 6f 75 20 65 6e 64 |er.. If| you end|
|00000790| 20 75 70 20 68 61 76 69 | 6e 67 20 6d 6f 72 65 20 | up havi|ng more |
|000007a0| 74 68 61 6e 20 6f 6e 65 | 20 6f 62 6a 65 63 74 20 |than one| object |
|000007b0| 74 68 61 74 20 79 6f 75 | 20 77 61 6e 74 20 74 6f |that you| want to|
|000007c0| 20 67 65 74 20 64 61 74 | 61 20 66 72 6f 6d 2c 20 | get dat|a from, |
|000007d0| 0a 69 6d 70 6c 65 6d 65 | 6e 74 69 6e 67 20 69 74 |.impleme|nting it|
|000007e0| 20 61 73 20 61 6e 20 65 | 78 74 65 72 6e 61 6c 20 | as an e|xternal |
|000007f0| 66 75 6e 63 74 69 6f 6e | 20 6d 65 61 6e 73 20 79 |function| means y|
|00000800| 6f 75 20 63 6f 75 6c 64 | 20 6f 76 65 72 72 69 64 |ou could| overrid|
|00000810| 65 20 47 65 74 44 61 74 | 61 28 29 20 0a 6f 72 20 |e GetDat|a() .or |
|00000820| 74 75 72 6e 20 69 74 20 | 69 6e 74 6f 20 61 20 74 |turn it |into a t|
|00000830| 65 6d 70 6c 61 74 65 20 | 66 75 6e 63 74 69 6f 6e |emplate |function|
|00000840| 20 2d 2d 20 65 69 74 68 | 65 72 20 77 61 79 2c 20 | -- eith|er way, |
|00000850| 79 6f 75 27 76 65 20 6d | 61 6e 61 67 65 64 20 74 |you've m|anaged t|
|00000860| 6f 20 6b 65 65 70 20 0a | 61 6c 6c 20 74 68 65 20 |o keep .|all the |
|00000870| 47 65 74 44 61 74 61 20 | 6c 6f 67 69 63 20 74 6f |GetData |logic to|
|00000880| 67 65 74 68 65 72 20 69 | 6e 73 74 65 61 64 20 6f |gether i|nstead o|
|00000890| 66 20 73 70 72 65 61 64 | 20 61 63 72 6f 73 73 20 |f spread| across |
|000008a0| 61 6c 6c 20 74 68 65 20 | 6f 62 6a 65 63 74 73 0a |all the |objects.|
|000008b0| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 67 65 74 20 |you want| to get |
|000008c0| 64 61 74 61 20 66 72 6f | 6d 2e 0a 0a 20 20 59 6f |data fro|m... Yo|
|000008d0| 75 20 6d 69 67 68 74 20 | 77 61 6e 74 20 74 6f 20 |u might |want to |
|000008e0| 61 73 6b 20 74 68 69 73 | 20 71 75 65 73 74 69 6f |ask this| questio|
|000008f0| 6e 20 69 6e 20 63 6f 6d | 70 2e 6f 62 6a 65 63 74 |n in com|p.object|
|00000900| 20 2d 2d 20 74 68 65 79 | 20 6c 6f 76 65 20 4f 4f | -- they| love OO|
|00000910| 20 64 65 73 69 67 6e 0a | 71 75 65 73 74 69 6f 6e | design.|question|
|00000920| 73 2e 0a 0a 4b 69 6d 62 | 65 72 6c 65 79 0a 0a |s...Kimb|erley.. |
+--------+-------------------------+-------------------------+--------+--------+